package edu.up.firesawakening;

/**
 * Class to model Castles (player bases). Used to guarantee that all player
 * bases have specified attributes.
 * 
 * @author Alex Hanemann
 * @version 19 November 2012
 */

public class Castle extends Unit {

	/**
	 * Serial ID
	 */
	private static final long serialVersionUID = 2762259823492476689L;

	/**
	 * Health value for all castles
	 */
	protected final static int CASTLE_HEALTH = 10;

	/**
	 * Armor value for all castles
	 */
	protected final static int CASTLE_ARMOR = 0;

	/**
	 * Constructs a special unit with limited mobility and attack, but high
	 * health and armor. Destruction of a player's castle ends the game
	 */
	public Castle(int playerIn) {
		super(CASTLE_HEALTH, 1, CASTLE_ARMOR, 0, 1, playerIn);
	}

	@Override
	public Castle clone() {
		Castle castle = new Castle(m_player);
		castle.setHealth(m_health);
		castle.setAttackAvailable(m_attackAvailable);
		return castle;
	}

}
